<?php get_instance()->view('common/header');?>
<style type="text/css">
    .set-box{border: 1px solid #e5e5e5;height: 100px;margin-top: 10px;overflow: auto;}
    .set-box>p{position: relative;margin: 5px 0 0 5px;}
    .set-box>p>i{position: absolute;right: 1px;top: -2px;color: red;font-weight: 200;}
    .rank-line{margin-bottom: 45px;}
    .rank-line>input{width: 30%;float: left;margin-right: 10px;}
    .set-box>p{margin: 10px 0 0 5px !important;}
    .btn-info{background: #eee;border-radius: 3px !important;}
    .btn-info>span{font-size: 12px;color: #000;}
    .delete{position: absolute;right: -0.35em;top: -0.35em;width: 0.9em;}
    .delete-rank-btn{margin-top: 6px;display: inline-block;width: auto;}
    .rank-btn{margin-top: 2.5px;}
    .rank-btn>img{display: inline-block;margin-top: -3px;}
</style>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"> <?php echo $title?> </h3>
                    <ul class="page-breadcrumb breadcrumb">
                        <li class="btn-group"> <a class="btn default ml_5 return" href="<?php echo getUrl('home');?>"><i class="fa fa-chevron-left"></i> 返回</a> </li>
                        <li> <i class="fa fa-home"></i> <a href="<?php echo getUrl('home');?>"> 首页  <i class="fa fa-angle-right"></i> </a></li>
                        <li><a href="#"><?php echo $title?><i class="fa fa-angle-right"></i></a></li>
                    </ul>
                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <!--开始-->
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN VALIDATION STATES-->
                    <div class="portlet box">
                        <div class="portlet-body form">
                            <!-- BEGIN FORM-->
                            <form action="<?php echo getUrl('config/base/save')?>" class="form-horizontal" method="post" novalidate="novalidate" id="frm">
                                <div class="form-body">

                                    <div class="hide">
                                        <h3>积分配置</h3>
                                        <hr/>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">注册赠送积分数量 <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="regiser_integral_number" value="<?php echo $info['regiser_integral_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">签到赠送积分数量(每日限一次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="sign_integral_number" value="<?php echo $info['sign_integral_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">发布信息赠送数量(每日首次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="publish_integral_number" value="<?php echo $info['publish_integral_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">分享赠送数量( 每日限5次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="share_integral_number" value="<?php echo $info['share_integral_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">在线购买积分获得系数( 百分比) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="integral_coefficient" value="<?php echo $info['integral_coefficient']?>" type="text">
                                            </div>
                                        </div>
                                        <h3>经验奖励配置</h3>
                                        <hr/>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">注册经验奖励值数量 <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="register_experience_value_number" value="<?php echo $info['register_experience_value_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">签到经验奖励数量(每日限一次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="sign_experience_value_number" value="<?php echo $info['sign_experience_value_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">发布信息经验奖励数量(每日首次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="publish_experience_value_number" value="<?php echo $info['publish_experience_value_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">分享经验奖励数量( 每日限5次) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="share_experience_value_number" value="<?php echo $info['share_experience_value_number']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-md-3">在线购买获得经验奖励系数( 百分比) <span class="required">*</span></label>
                                            <div class="col-md-6">
                                                <input class="form-control required" name="experience_value_coefficient" value="<?php echo $info['experience_value_coefficient']?>" type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                        <label class="control-label col-md-3">经验值等级区间 <span class="required">*</span></label>
                                        <div class="modal-rank">
                                            <div class="col-md-6 rank-box" index="1">
                                                <?php $i = 1; $l = 1; if (!empty($info['rank_experience'])): foreach ($info['rank_experience'] as $k => $v): $i = $k; $c = count($info['rank_experience']);?>
                                                    <div class="rank-line">
                                                        <input class="form-control rank_name" name="rank_experience[<?php echo $k?>][rank_name]" type="tel" placeholder="等级名称" value="<?php echo $v['rank_name']?>" >
                                                        <input class="form-control min_experience" name="rank_experience[<?php echo $k?>][min_experience]" type="tel" placeholder="最小范围" value="<?php echo $v['min_experience']?>" <?php if ($c > 1):?> readonly <?php endif;?> >
                                                        <input class="form-control max_experience" name="rank_experience[<?php echo $k?>][max_experience]" type="tel" placeholder="最大范围，-1为无限" value="<?php echo $v['max_experience']?>" <?php if ($c != $l):?> readonly <?php endif;?>>
                                                        <a href="javascript:void(0);" <?php if ($c == $l):?> class="delete-rank-btn" <?php else:?> class="delete-rank-btn hide" <?php endif;?> ><i class="fa fa-times"></i> 删除</a>
                                                    </div>
                                                <?php $l+=1; endforeach; else:?>
                                                    <div class="rank-line">
                                                        <input class="form-control rank_name" name="rank_experience[1][rank_name]" type="tel" placeholder="等级名称">
                                                        <input class="form-control min_experience" name="rank_experience[1][min_experience]" type="tel" placeholder="最小范围">
                                                        <input class="form-control max_experience" name="rank_experience[1][max_experience]" type="tel" placeholder="最大范围，-1为无限">
                                                        <a href="javascript:void(0);" class="delete-rank-btn"><img
                                                                    src="<?php echo $this->staticUrl;?>img/2.png" alt=""></a>
                                                    </div>
                                                <?php endif;?>
                                            </div>
                                            <a href="javascript:;" class="btn btn-sm rank-btn"><img src="<?php echo $this->staticUrl;?>img/4.png"
                                                                                                         alt=""> 添加</a>
                                        </div>

                                    </div>
                                    </div>
                                    <script type="text/javascript">
                                        $(function(){
                                            var modal = $('.modal-rank');
                                            modal.find('.rank-box').attr('index', <?php echo $i?>);
                                            modal.find('.rank-btn').click(function(){
                                                var len = modal.find('.rank-line').length;
                                                var rank = modal.find('.rank-line').eq(len - 1);
                                                var value = '', readonly = '';
                                                if (len > 0) {
                                                    var vl = rank.find('.rank_name').val();
                                                    var min = rank.find('.min_experience').val();
                                                    var max = rank.find('.max_experience').val();
                                                    if (!vl.length || !min.length || !max.length) {
                                                        show_message({status: 0, message: '请完成上一个区间的填写'});
                                                        return false;
                                                    }
                                                    if (max == '-1'){
                                                        show_message({status: 0, message: '最大范围已经添加到无限，不可再次添加范围'});
                                                        return false;
                                                    }
                                                    if (max <= min){
                                                        show_message({status: 0, message: '最大范围必须大于最小范围'});
                                                        return false;
                                                    }
                                                    rank.find('.min_experience').attr('readonly', 'readonly');
                                                    rank.find('.max_experience').attr('readonly', 'readonly');
                                                    rank.find('.delete-rank-btn').addClass('hide');
                                                    value = max;
                                                    readonly = 'readonly';
                                                }
                                                var i = modal.find(".rank-box").attr('index');
                                                i = parseInt(i)+1;
                                                modal.find(".rank-box").attr('index', i);
                                                var rank_experience = "rank_experience["+i+"]";
                                                var deleteImg = "<?php echo $this->staticUrl;?>img/2.png";
                                                var html = '<div class="rank-line">'+
                                                    '<input class="form-control rank_name" name="'+rank_experience+'[rank_name]" type="tel" placeholder="等级名称">'+
                                                    '<input class="form-control min_experience" name="'+rank_experience+'[min_experience]" type="tel" placeholder="最小范围"  value="'+value+'" readonly="'+readonly+'">'+
                                                    '<input class="form-control max_experience" name="'+rank_experience+'[max_experience]" type="tel" placeholder="最大范围，-1为无限">'+
                                                    '<a href="javascript:void(0);" class="delete-rank-btn"><img src="'+deleteImg+'" alt=""></a>'+
                                                    '</div>';
                                                var obj = $(html);
                                                modal.find('.rank-box').append(obj);
                                                obj.focus();
                                            });

                                            modal.find('.delete-rank-btn').live('click', function(){
                                                $(this).parents('.rank-line').remove();
                                                var len = modal.find('.rank-line').length;
                                                var rank = modal.find('.rank-line').eq(len-1);
                                                rank.find('.min_experience').removeAttr('readonly');
                                                rank.find('.max_experience').removeAttr('readonly');
                                                rank.find('.delete-rank-btn').removeClass('hide');
                                            });
                                        });
                                    </script>
                                    <h3>基础配置</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">商家配送范围 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <div class="input-group">
                                                <input class="form-control required number" name="merchant_distance_limit" value="<?php echo $info['merchant_distance_limit']?>" type="text">
                                                <span class="input-group-addon">
													公里
												</span>
                                            </div>
                                            <span for="deliveryman_range" class="help-block validate_message hide"></span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">订单商品退差价百分比 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <div class="input-group">
                                            <input class="form-control required number" maxlength="7" name="change_order_percent" value="<?php echo $info['change_order_percent']?>" type="text">
                                            <span class="input-group-addon">
													%
												</span>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">分享奖励比例 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <div class="input-group">
                                            <input class="form-control required number" maxlength="7" name="share_percent" value="<?php echo $info['share_percent']?>" type="text">
                                            <span class="input-group-addon">
													%
												</span>
                                        </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">热门搜索 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control" name="search_val" type="text">
                                            <div class="set-box hot-box">
                                                <?php foreach ($info['hot_search'] as $k => $v):?>
                                                    <p class="btn btn-info">
                                                        <span><?php echo $v?></span>
                                                        <img class="delete delete-hot" src="<?php echo $this->staticUrl;?>img/3.png" alt="">
                                                        <input type="hidden" value="<?php echo $v?>" name="hot_search[]">
                                                    </p>
                                                <?php endforeach;?>
                                            </div>
                                        </div>
                                        <div class="col-md-1">
                                            <a href="javascript:;" class="btn btn-sm add-btn-hot">
                                                <img src="<?php echo $this->staticUrl;?>img/4.png" class="add-btn1"> 添加
                                            </a>
                                        </div>
                                        <script type="text/javascript">
                                            $(function () {
                                                $(".add-btn-hot").live('click',function () {
                                                    var vl = $("[name='search_val']").val();
                                                    if (!vl.length){
                                                        show_message({status:0, message:'请填写搜索关键词'});
                                                        return false;
                                                    }
                                                    var deleteImg = "<?php echo $this->staticUrl;?>img/3.png";
                                                    var heml = '<p class="btn btn-info">' +
                                                        '<span>'+vl+'</span>' +
                                                        '<img class="delete delete-hot" src="'+deleteImg+'" alt="">' +
                                                        '<input type="hidden" value="'+vl+'" name="hot_search[]">' +
                                                        '</p>';
                                                    $(".hot-box").append(heml);
                                                    $("[name='search_val']").val('');
                                                });

                                                $(".delete-hot").live('click',function () {
                                                    $(this).parent().remove();
                                                });
                                            })
                                        </script>
                                    </div>
                                    <h3>售后配置</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">申请售后时间 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <div class="input-group">
                                                <input class="form-control required" name="aftersale_limite_day" value="<?php echo $info['aftersale_limite_day']?>" type="text">
                                                <span class="input-group-addon">
													小时
												</span>
                                            </div>
                                            <span for="deliveryman_range" class="help-block validate_message hide"></span>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3">售后原因配置 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control" name="reason_val" type="text">
                                            <div class="set-box reason">
                                                <?php foreach ($info['aftersale_reason'] as $k => $v):?>
                                                    <p class="btn btn-info">
                                                        <span><?php echo $v?></span>
                                                        <img class="delete delete-reason" src="<?php echo $this->staticUrl;?>img/3.png" alt="">
                                                        <input type="hidden" value="<?php echo $v?>" name="aftersale_reason[]">
                                                    </p>
                                                <?php endforeach;?>
                                            </div>
                                        </div>
                                        <div class="col-md-1">
                                            <a href="javascript:;" class="btn btn-sm add-btn">
                                                <img src="<?php echo $this->staticUrl;?>img/4.png" class="add-btn1"> 添加
                                            </a>
                                        </div>
                                        <script type="text/javascript">
                                            $(function () {
                                                $(".add-btn").live('click',function () {
                                                    var vl = $("[name='reason_val']").val();
                                                    if (!vl.length){
                                                        show_message({status:0, message:'请填写售后原因'});
                                                        return false;
                                                    }
                                                    var deleteImg = "<?php echo $this->staticUrl;?>img/3.png";
                                                    var heml = '<p class="btn btn-info">' +
                                                        '<span>'+vl+'</span>' +
                                                        '<img class="delete delete-reason" src="'+deleteImg+'" alt="">' +
                                                        '<input type="hidden" value="'+vl+'" name="aftersale_reason[]">' +
                                                        '</p>';
                                                    $(".reason").append(heml);
                                                    $("[name='reason_val']").val('');
                                                });

                                                $(".delete-reason").live('click',function () {
                                                    $(this).parent().remove();
                                                });
                                            })
                                        </script>
                                    </div>
                                    <h3>评论标签配置</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">评论标签配置 <span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control" name="comment_val" type="text">
                                            <div class="set-box comment">
                                                <?php foreach ($info['merchant_comment_tags'] as $k => $v):?>
                                                    <p class="btn btn-info">
                                                        <span><?php echo $v?></span>
                                                        <img class="delete delete-comment" src="<?php echo $this->staticUrl;?>img/3.png" alt="">
                                                        <input type="hidden" value="<?php echo $v?>" name="comment[]">
                                                    </p>
                                                <?php endforeach;?>
                                            </div>
                                        </div>
                                        <div class="col-md-1">
                                            <a href="javascript:;" class="btn btn-sm comment-btn">
                                                <img src="<?php echo $this->staticUrl;?>img/4.png" class="add-btn1"> 添加
                                            </a>
                                        </div>
                                        <script type="text/javascript">
                                            $(function () {
                                                $(".comment-btn").live('click',function () {
                                                    var vl = $("[name='comment_val']").val();
                                                    if (!vl.length){
                                                        show_message({status:0, message:'请填写评论标签'});
                                                        return false;
                                                    }
                                                    var deleteImg = "<?php echo $this->staticUrl;?>img/3.png";
                                                    var heml = '<p class="btn btn-info">' +
                                                        '<span>'+vl+'</span>' +
                                                        '<img class="delete delete-comment" src="'+deleteImg+'" alt="">' +
                                                        '<input type="hidden" value="'+vl+'" name="comment[]">' +
                                                        '</p>';
                                                    $(".comment").append(heml);
                                                    $("[name='comment_val']").val('');
                                                });

                                                $(".delete-comment").live('click',function () {
                                                    $(this).parent().remove();
                                                });
                                            })
                                        </script>
                                    </div>
                                    <h3>分享</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">分享图标<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <img width="100px" height="100px" id="icn-img" alt="" src="<?php echo $info['sharp_icon'] ? getImage($info['sharp_icon'],'og') : getDefaultImg();?>">
                                            <a class="upload-btn" href="javascript:void(0);">上传图片</a>
                                            <input type="hidden" name="icon" id="pic"/>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">分享标题<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="sharp_title" value="<?php echo $info['sharp_title']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">分享地址<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="sharp_url" value="<?php echo $info['sharp_url']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">分享描述<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="sharp_desc" value="<?php echo $info['sharp_desc']?>" type="text">
                                        </div>
                                    </div>
                                    <h3>商家端设置</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">客服电话<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="web_merchant_service_tel" value="<?php echo $info['web_merchant_service_tel']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓版本号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_merchant_version" value="<?php echo $info['app_merchant_version']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓版本编号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_merchant_android_code" value="<?php echo $info['app_merchant_android_code']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓更新内容<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <textarea  class="form-control required" name="app_merchant_update_description" ><?php echo $info['app_merchant_update_description']?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓强制更新<span class="required">*</span></label>
                                        <div class="col-md-6" style="margin-left: 18px;">
                                            <div class="radio-list">
                                                <label class="radio-inline"><input name="merchant_android_is_forced" <?php if($info['merchant_android_is_forced'] == '0'):?> checked<?php endif;?> value="0" type="radio"> 否 </label>
                                                <label class="radio-inline"><input name="merchant_android_is_forced" <?php if($info['merchant_android_is_forced'] == '1'):?> checked<?php endif;?> value="1" type="radio"> 是 </label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓下载地址<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_merchant_android_download_url" value="<?php echo $info['app_merchant_android_download_url']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios版本号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="merchant_ios_version" value="<?php echo $info['merchant_ios_version']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios更新内容<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <textarea  class="form-control required" name="merchant_ios_update_description" ><?php echo $info['merchant_ios_update_description']?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios强制更新<span class="required">*</span></label>
                                        <div class="col-md-6" style="margin-left: 18px;">
                                            <div class="radio-list">
                                                <label class="radio-inline"><input name="merchant_ios_is_forced" <?php if($info['merchant_ios_is_forced'] == '0'):?> checked<?php endif;?> value="0" type="radio"> 否 </label>
                                                <label class="radio-inline"><input name="merchant_ios_is_forced" <?php if($info['merchant_ios_is_forced'] == '1'):?> checked<?php endif;?> value="1" type="radio"> 是 </label>

                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3">苹果下载地址<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_merchant_ios_download_url" value="<?php echo $info['app_merchant_ios_download_url']?>" type="text">
                                        </div>
                                    </div>

                                    <h3>用户端设置</h3>
                                    <hr/>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">客服电话<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="web_service_tel" value="<?php echo $info['web_service_tel']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">在线客服<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="web_service_qq" value="<?php echo $info['web_service_qq']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓版本号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_consumer_version" value="<?php echo $info['app_consumer_version']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓版本编号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_consumer_android_code" value="<?php echo $info['app_consumer_android_code']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓更新内容<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <textarea  class="form-control required" name="app_consumer_update_description" ><?php echo $info['app_consumer_update_description']?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓强制更新<span class="required">*</span></label>
                                        <div class="col-md-6" style="margin-left: 18px;">
                                            <div class="radio-list">
                                                <label class="radio-inline"><input name="consumer_android_is_forced" <?php if($info['consumer_android_is_forced'] == '0'):?> checked<?php endif;?> value="0" type="radio"> 否 </label>
                                                <label class="radio-inline"><input name="consumer_android_is_forced" <?php if($info['consumer_android_is_forced'] == '1'):?> checked<?php endif;?> value="1" type="radio"> 是 </label>

                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">安卓下载地址<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_consumer_android_download_url" value="<?php echo $info['app_consumer_android_download_url']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios版本号<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="consumer_ios_version" value="<?php echo $info['consumer_ios_version']?>" type="text">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios更新内容<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <textarea  class="form-control required" name="consumer_ios_update_description" ><?php echo $info['consumer_ios_update_description']?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">ios强制更新<span class="required">*</span></label>
                                        <div class="col-md-6" style="margin-left: 18px;">
                                            <div class="radio-list">
                                                <label class="radio-inline"><input name="consumer_ios_is_forced" <?php if($info['consumer_ios_is_forced'] == '0'):?> checked<?php endif;?> value="0" type="radio"> 否 </label>
                                                <label class="radio-inline"><input name="consumer_ios_is_forced" <?php if($info['consumer_ios_is_forced'] == '1'):?> checked<?php endif;?> value="1" type="radio"> 是 </label>

                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3">苹果下载地址<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <input class="form-control required" name="app_consumer_ios_download_url" value="<?php echo $info['app_consumer_ios_download_url']?>" type="text">
                                        </div>
                                    </div>
                                    <!-- 用户引导广告 -->
                                    <div class="form-group">
                                        <label class="control-label col-md-3">用户引导广告(538*888)<span class="required">*</span></label>
                                        <div class="col-md-6">
                                            <div id="uploader-demo">
                                                <!--用来存放item-->
                                                <div class="uploader-list">
                                                    <?php if ($info['consumer_ads']):?>
                                                        <?php  foreach ($info['consumer_ads'] as $v):?>
                                                            <div id="" class="file-item thumbnail pic-list">
                                                                <img src="<?php echo getImage($v,'og'); ?>">
                                                                <a title="删除" class="delete-btn hide" href="javascript:void(0);" style="color:#b94a48;position:absolute;top:-10px;right:-5px;background-color:#ffff;height:17px;width:15px;font-size:12px;padding:2px;">
                                                                    <i class="fa fa-times"></i>
                                                                </a>
                                                                <input name="consumer_ads[]" type="hidden" class="file-name" value="<?php echo $v; ?>">
                                                            </div>
                                                        <?php endforeach; endif;?>
                                                    <div id="filePicker" class="file-item thumbnail webuploader-container">
                                                        <div class="webuploader-pick">
                                                            <div style="position:absolute;top:0;left:0;width:100%;height:100%;padding-top:80px;color:grey;">选择图片</div>
                                                            <img title="选择上传图片" src="<?php echo getDefaultImg(); ?>">
                                                        </div>
                                                        <div id="rt_rt_1c2t7atu83351ra0bvm7gcgnu1" style="position: absolute; top: 4px; left: 4px; width: 100px; height: 100px; overflow: hidden; bottom: auto; right: auto;">
                                                            <input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*">
                                                            <label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);">
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>
                                                <script type="text/javascript">


                                                    $(function(){
                                                        uploadImg({
                                                            box:'#uploader-demo',
                                                            uploadBtn:"#filePicker",
                                                            fileName:'consumer_ads[]',
                                                            width:110,  //显示缩略图宽带
                                                            uploadUrl:'<?php echo getUrl('product/home/uploadImgs');?>',
                                                            height:100,	//显示缩略图高度
                                                            number:3
                                                        });

                                                    });

                                                </script>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-actionsc fluid">
                                    <div class="col-md-offset-3 col-md-9">
                                        <button type="submit" class="btn green"><i class="fa fa-save"></i> 保存</button>
                                        <a href="<?php echo getUrl('home');?>" class="btn default"><i class="fa fa-chevron-left"></i> 返回</a>
                                    </div>
                                </div>
                            </form>
                            <!-- END FORM-->
                        </div>
                    </div>
                    <!-- END VALIDATION STATES-->
                </div>
            </div>
            <!--结束-->
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $.e_validate.init('#frm',{});
    });

    cropitMaster({
        uploadBtn:$('.upload-btn'),
        width:'102px',
        height:'102px',
        complete:function(btn,data){
            $('#icn-img').attr('src', data);
            $('#pic').val(data).change();
        }
    });
</script>
</body>
</html>